<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
  <link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">
  <title>宠物收养后台登录</title>
  <link rel="stylesheet" media="screen" href="${pageContext.request.contextPath}/css/style.css">
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/reset.css"/>
  <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/bootstrap.css"/>
  
  <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.js" ></script>
  <script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.min.js"/></script>
  
  <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.validate.min.js" ></script>
  <script type="text/javascript" src="${pageContext.request.contextPath}/js/messages_zh.js"></script>
  
   <!--用户表单校验-->
<script type="text/javascript">
			$(function(){
				$("#checkForm").validate({
					rules:{
						adminname:{
							required:true,
							minlength:6
						},
						adminpassword:{
							required:true,
							minlength:6
						}
					},
					messages:{
							adminname:{
							required:"用户名不能为空",
							minlength:"至少要输入六个字符"
						},
						adminpassword:{
							required:"密码不能为空",	
							minlength:"密码最小长度为6"
						}
					}
				});
			});
		</script>
		
</head>
 
<body>
	
<div class="container" style="width: 100%; height: 100%; background: url(${pageContext.request.contextPath}/img/bg.jpg);">
		<div class="container-fluid img-rounded" style="width:400px; height: 500px; background-color: white; margin-top: 100px;">
			<div class="row">
				<div class="col-lg-12">
					<div id="" style="margin-top: 80px; margin-left: 30px;">
						<p style="font-size: 30px;">管理员登录</p>
					</div>
				</div>
			</div>
			
		
			<form id="checkForm" class="form-horizontal" action="${pageContext.request.contextPath }/admin/adminlog.html" method="post">
				
				<div class="row" style="margin-left: 40px;margin-top: 30px;">
					<!--错误提示信息-->
					<c:if test="${not empty message}">
					<div class="col-lg-4"><span style="font-size:20px; color: red;">${message}</span></div>
					</c:if>
				</div>
			<div class="row" style="margin-top: 20px; margin-left: 10px;">  
				<div class="col-lg-12" >
					<div class="form-group">
						<label for="adminname" class="col-sm-3 control-label">账号:</label>
						<div class="col-sm-6">
							<input type="text" id="adminname" name="adminname" class="form-control input-sm" placeholder="请输入账号">
						</div>
					</div>
					<div class="form-group">
						<label for="adminpassword" class="col-sm-3 control-label">密码:</label>
						<div class="col-sm-6">
							<input type="password" id="adminpassword" name="adminpassword" class="form-control input-sm" placeholder="请输入密码">
						</div>
					</div>
					<div class="form-group" style="margin-left: 50px;">
						<div class="col-sm-offset-2 col-lg-12">
							<button type="submit" class="btn btn-default">登录</button>	
						</div>
					</div>
				</form>
					
				</div>
			</div>
			</form>
		</div>
	</div>
	
</body>

</html>